<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        .item{
            display: flex;
        }
        .left img{
            width: 80px;
            height: 80px;
            border-radius: 50%;
            padding-left: 20px;
        }
        #box{
            width: 600px;
            height: 700px;
            text-align: center;
            margin: auto;
            margin-top: 120px;
            background-color: rgb(255, 190, 149);
            border: 3px solid rgb(249, 160, 16);
            border-radius: 30px;
        }
        .title{
            font-size: 30px;
            margin: 5px 5px;
        }
        .list .item{
            width: 580px;
            height: 100px;
            background-color: rgb(255, 255, 255);
            border-radius: 10px;
            margin: auto;
            margin-top: 30px;
            text-align: center;
            display: flex;
            justify-content: space-between;
            text-align: left;
            box-shadow: 5px 5px 20px  rgb(158, 129, 88);
        }
        button{
            width: 80px;
            height: 40px;
            background-color: rgb(233, 216, 21);
            margin-top: 30px;
            border-radius: 50px;
            border: 2px solid rgb(226, 140, 41);
            margin-right: 20px;
        }
        .main{
            margin-top: 15px;
        }
    </style>
</head>
<body>
    <div id="box">
        <div class="title">任务列表</div>
        <p>每完成一个任务，即可获得10MB~1GB流量哦！</p>
        <div class="list">
            <div class="item"  v-for="(item,index) in tasklist" v-bind:key="index">
                <div class="left">
                    <img v-bind:src="item.pic" alt="">
                </div>
                <div class="main">
                    <h2>{{ item.name }}</h2>
                    <div>{{ item.desc }}</div>
                </div>
                <div class="right">
                    <button>{{item.status==1?'去完成':(item.status==2?'领取':'已领取')}}</button>
                </div>
            </div>
        </div>
    </div>
</body>
</html>
<script src="./vue-2.5.21.js"></script>
<script>
    var v=new Vue({
        el:'#box',
        data:{
            tasklist:[
            {id:1,pic:"../day01-vue基础指令/pic.png",name:"咪咕视频送流量",desc:"来咪咕视频，每月领500MB流量奖励",status:1},
            {id:1,pic:"../day01-vue基础指令/pic.png",name:"和彩云送福利",desc:"免费领100G空间+月月2GB",status:3},
            {id:1,pic:"../day01-vue基础指令/pic.png",name:"最高40元套餐折扣券",desc:"参与抽奖，奖励10MB，经验值+10",status:2},
            {id:1,pic:"../day01-vue基础指令/pic.png",name:"吃喝玩乐季，超级秒杀",desc:"进入隐藏二楼参与秒杀，奖励10MB，经验值+10",status:1}
            ]
        },
    })
</script>